import Vue from 'vue';
import App from './App';
import { getLogger } from 'libraries/logger';
import store from './stores';
import 'styles/icon.scss';
import 'styles/global.scss';
import uView from 'uview-ui';
import moment from 'moment';

Vue.config.errorHandler = (err, vm, info) => {
    getLogger('Global').ERROR(err, info);
};

Vue.use(uView);
Vue.prototype.getLogger = getLogger;

Vue.config.performance = process.env.NODE_ENV === 'development';
Vue.config.productionTip = process.env.NODE_ENV === 'development';
Vue.filter('timeFormat', (value) => moment(value).format('YYYY-MM-DD'));

App.mpType = 'app';

const app = new Vue({
    ...App,
    store
});
app.$mount();
